// const dataService = require('./service/dataService.js')
// //const {test} = require('./test.js')

// class ApiClient{
//     constructor(config){
//         this.__config = config                
//         this.dataService = new dataService(this.__config)
//     }
// }

// const easyisapi = new ApiClient({apiUrl:'https://easyis.xiaoyung.com/prod-api',apiToken:'tokenxxx'})


// ;(async ()=>{
//     //await test()
//     const data =  await easyisapi.dataService.insert('table1',{name:'xx',remark:'备注'})
//     console.log('data',data)
// })()


// const r = main()
// if(r instanceof Promise){
//   const ret = await r
//   input(ret)
// }else{
//   input(r)
// }

/* const EasyisApiClient = require('./openapi/EasyisOpenApiClient.js')
const config = {
    baseURL:'https://easyis.xiaoyung.com/prod-api',
    token:'xxx'
}
const {dataService} = new EasyisApiClient(config)

;(async ()=>{
    const data = await dataService.insert({tableCode:'table1',formData:{name:'xxx'},triggerWorkFLow:false})
    console.log('insert data',data)
 })()

 */


 //const {Test,EasyisOpenApi} = require('/opt/nodejs/node_modules/easyisapi-sdk/index.js')
 //const EasyisOpenApi = require('./openapi/EasyisOpenApi.js')

 const {GlobalInstall,EasyisOpenApi} = require('../index.js')
 //global.__openapi_token='xxxxx'
 GlobalInstall()
 
;(async ()=>{
	const data = await dataService.insert({tableCode:'bad',formData:{field01:'aaaa',create_by:'aa'},triggerWorkFLow:false})

	console.log("========result=========")
	console.log(JSON.stringify(data))
 })()